package com.Pan;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.google.common.collect.Lists;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @ClassName StoreExcelListener
 * @Description: TODO
 * @Author yangtao
 * @Date 2022/2/11
 **/
@Data
@Slf4j
public class ExcelListener extends AnalysisEventListener<ImportDTO> {

    private List<ImportDTO> list = Lists.newArrayList();

    @Override
    public void invoke(ImportDTO importDTO, AnalysisContext analysisContext) {
        list.add(importDTO);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

}
